-
-
Notifications
You must be signed in to change notification settings - Fork 33k
gh-139146: Check calloc() results in test_pre_initialization_sys_options #139147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b4619e8
to
3be06fb
Compare
@picnixz Thanks for the review. I’ve pushed the updated version. |
…s_options Reported by: Dmitrii Chuprov [email protected] Signed-off-by: Denis Sergeev <[email protected]>
34262eb
to
4e88014
Compare
…initialization_sys_options` (pythonGH-139147) (cherry picked from commit 9c6a1f8) Co-authored-by: Denis Sergeev <[email protected]> Reported by: Dmitrii Chuprov <[email protected]> Signed-off-by: Denis Sergeev <[email protected]>
…initialization_sys_options` (pythonGH-139147) (cherry picked from commit 9c6a1f8) Co-authored-by: Denis Sergeev <[email protected]> Reported by: Dmitrii Chuprov <[email protected]> Signed-off-by: Denis Sergeev <[email protected]>
GH-139413 is a backport of this pull request to the 3.14 branch. |
GH-139414 is a backport of this pull request to the 3.13 branch. |
…_initialization_sys_options` (GH-139147) (#139414) gh-139146: Check `calloc()` results in `_testembed.c::test_pre_initialization_sys_options` (GH-139147) (cherry picked from commit 9c6a1f8) Reported by: Dmitrii Chuprov <[email protected]> Signed-off-by: Denis Sergeev <[email protected]> Co-authored-by: Denis Sergeev <[email protected]>
|
|
This is an unrelated failure. Don't worry. |
Got it, thanks! |
|
…_initialization_sys_options` (GH-139147) (#139413) Co-authored-by: Denis Sergeev <[email protected]>
In
test_pre_initialization_sys_options()
(Programs/_testembed.c),the results of
calloc()
were not checked before passing the pointersto
wcsncpy()
. On allocation failure (OOM), this could lead to a NULL dereference.This patch adds NULL checks for both allocations and frees already allocated
memory before returning on error.
skip news